<?php
declare (strict_types=1);

namespace app\common\model;

use cores\BaseModel;
use think\model\concern\SoftDelete;

class Employee extends BaseModel
{
    use SoftDelete;
    protected $deleteTime = 'delete_time';
    protected $defaultSoftDelete = 0;
    // 定义表名
    protected $name = 'employee';

    // 定义主键
    protected $pk = 'employee_id';

    // 是否允许全局查询store_id
    protected $isGlobalScopeStoreId = false;

    public function user()
    {
        return $this->hasOne('User', 'user_id', 'user_id');
    }
}
